package com.example.shopping2.a_c_fragment.car.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.shopping2.R
import com.example.shopping2.a_c_fragment.car.entity.OrderGoodsEntity

class Order_Adapter (list:ArrayList<OrderGoodsEntity.DataBean.OrderGoodsListBean>):BaseQuickAdapter<OrderGoodsEntity.DataBean.OrderGoodsListBean,BaseViewHolder>(R.layout.order_item,list) {
    override fun convert(holder: BaseViewHolder, item: OrderGoodsEntity.DataBean.OrderGoodsListBean) {
        holder.setText(R.id.order_item_title,item.goods_desc)
        holder.setText(R.id.order_item_sku,item.goods_sku)
        holder.setText(R.id.order_item_price,"￥"+item.goods_price)
        holder.setText(R.id.order_item_sum,"X"+item.goods_count+"件")
        Glide.with(context).load(item.goods_icon).into(holder.getView(R.id.order_item_icon))

    }
}